package com.arofoxmsn.utils;

public class ParametersTool {
	
	public static void testNullObject(Object...objects){
		for(Object o : objects){
			if(o == null){
				throw new IllegalArgumentException();
			}
		}
	}
	
	public static boolean testNullObjectBoolean(Object...objects){
		try{
			testNullObject(objects);
			return true;
		}catch(IllegalArgumentException e){
			return false;
		}
	}
	
	public static void testNullString(String ...args) throws IllegalArgumentException{
		testNullObject((Object[])args);
		for(String one : args){
			if(one.equals(""))
				throw new IllegalArgumentException();
		}
	}
	
	public static boolean testNullStringBoolean(String ...args){
		try{
			testNullString(args);
			return true;
		}catch(IllegalArgumentException e){
			return false;
		}
	}
}
